const {Comment} = require('../../model/comment');

module.exports = async (req,res) => {
    const id = req.query.id;
    // res.send(id)
    
    // const dd = await Comment.findOne({_id: id});
    // res.send(dd);
    // return

    await Comment.findOneAndDelete({_id: id});
    res.redirect('/home/article');
}